//
// Created by choumei on 2021/9/12.
//

#ifndef NETCLIENT_MYBUFFER_H
#define NETCLIENT_MYBUFFER_H

#include<QTcpSocket>
#include<QMutex>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
const int tempBufSize = 4096;

class MyBuffer {
public:
    MyBuffer();

    ~MyBuffer();

    void receiveData();

    int read(char *data, int qLen);

     int sockfd;
private:
    int rId;
    int wId;
    char *dataBuf = nullptr;
};


#endif //NETCLIENT_MYBUFFER_H
